vpci/msix: remove from table list on detach
authorRoger Pau Monné <roger.pau@citrix.com>
Mon, 31 Oct 2022 12:25:40 +0000 (13:25 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 31 Oct 2022 12:25:40 +0000 (13:25 +0100)
commit8f3f8f20de5cea704671d4ca83f2dceb93ab98d8
treebefc7ef6fb76a99c8b8831f06a983422df7b43a4
parent96d26f11f56e83b98ec184f4e0d17161efe3a927
vpci/msix: remove from table list on detach

Teardown of MSIX vPCI related data doesn't currently remove the MSIX
device data from the list of MSIX tables handled by the domain,
leading to a use-after-free of the data in the msix structure.

Remove the structure from the list before freeing in order to solve
it.

Reported-by: Jan Beulich <jbeulich@suse.com>
Fixes: d6281be9d0 ('vpci/msix: add MSI-X handlers')
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
master commit: c14aea137eab29eb9c30bfad745a00c65ad21066
master date: 2022-10-26 14:56:58 +0200
xen/drivers/vpci/vpci.c